package com.erp.module.caiLiaoZhiLiang

import android.content.Context
import com.erp.bean.CaiLiaoZhiLiangBean
import com.erp.Interface.OnUserDataInterface

/**
 * Created by Administrator on 2019/3/11/011.
 * 作者：刘洋
 * 材料质量
 */
interface CaiLiaoZhiLiangContract {
    interface CaiLiaoZhiLiangKView {
        //上拉加载成功
        fun shanglaOk()
        //上拉加载失败
        fun shanglaNo()
        //下拉刷新成功
        fun xialaOk()
        //下拉刷新失败
        fun xialaNo()
        //搜索数据成功
        fun sousuoOk()
        //搜索数据失败
        fun sousuoNo()
        //删除一条成功
        fun deleteOk(position: Int)
        //删除一条失败
        fun deleteNo()
    }

    interface CaiLiaoZhiLiangKP {
        //上拉刷新
        fun shangla()
        //下拉加载
        fun xiala()
        //搜索
        fun sousuo(sousuo : String,hege : String,StartTime : String , EndTime : String)
        //删除
        fun delete(position : Int)
    }
    /**网络访问*/
    interface CaiLiaoZhiLiangMP{
        /**获取材料质量列表*/
        fun getGongyingCailiaoZhiliang(context :Context,page : Int,pagesize : Int,sousuo :String,hege :String,startTime:String,endTime:String,onUserDataInterface: OnUserDataInterface)
        /**获取货品编码列表*/
        fun getHuopingBianma(context: Context,onUserDataInterface: OnUserDataInterface)
        /**获取供应商列表*/
        fun getGongyingshangLieBiao(context: Context,onUserDataInterface: OnUserDataInterface)
        /**获取材料类别列表*/
        fun getCailiaoLeibie(context: Context,onUserDataInterface: OnUserDataInterface)
        /**获取问题代码*/
        fun getWentiDaima(context: Context,onUserDataInterface: OnUserDataInterface)
        /**新增修改材料质量*/
        fun setGongyingCailiaoZhiliang(context: Context,code : Int,bean: CaiLiaoZhiLiangBean,deletephoto : List<CaiLiaoZhiLiangBean.photo>  ,onUserDataInterface : OnUserDataInterface )
    }
    /**修改材料质量*/
    interface XiuGaiCailiaoZhiliangKP {
        //获取货品编码数据
        fun getHuoping()
        //获取供应商数据
        fun getGongyingshang()
        //获取材料类别数据
        fun getCailiaoLeibie()
        //获取问题代码数据
        fun getWentiDaima()
        //新建修改材料质量
        fun XingjianXiugaiCailiao(bean : CaiLiaoZhiLiangBean, deletephoto : List<CaiLiaoZhiLiangBean.photo>)
    }

    interface XiuGaiCaiLiaoZhiLiangKView {
        //获取货品资料数据成功
        fun HuopingOk(ids: ArrayList<String>, names: ArrayList<String>)
        //获取货品资料数据失败
        fun HuopingNo()
        //获取供应商数据成功
        fun GongyingshangOk(ids: ArrayList<String>, names: ArrayList<String>)
        //获取供应商数据失败
        fun GongyingshangNo()
        //获取材料类别数据成功
        fun CailiaoLeibieOk(ids: ArrayList<String>, names: ArrayList<String> )
        //获取材料类别数据失败
        fun CailiaoLeibieNo()
        //获取问题代码数据成功
        fun WentiDaimaOk(ids: ArrayList<String>, names: ArrayList<String>)
        //获取问题代码数据失败
        fun WentiDaimaNo()
        //新建材料质量问题成功
        fun XingjianCailiaoOk()
        //新建材料质量问题失败
        fun XingjianCailiaoNo()
        //修改材料质量问题成功
        fun XiugaiCailiaoOk()
        //修改材料质量问题失败
        fun XiugaiCailiaoNo()
    }
}